home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************************************************************/
- in_txt1 = "SV-Slideshow.rexx V 1.06 04.10.98 © by Ulrich Falke"
- in_txt2 = "===================================================" /*
-
- Script that shows given files of a directory,
- using SViewII (registered) © by Andreas Ralph Kleinert,
- RexxReqTools.library © by Rafael D'Halleweyn and of course
- ReqTools.library © by Nico François and Magnus Holmgren.
-
- With this script I test my ARexx-skills, it's long time ago that I write ARexx-scripts.
- It's easyer to find errors here, than in the bigger SV-ProcessPics-script.
- From here I take working parts to the bigger SV-ProcessPics-script, so the history's may not
- have big differences.
-
- Attention: If the SV-WindowDriver shows a pic that is bigger
- than the display, you can scroll with the cursor-keys.
- The script waits for a keyboard or mouse-button press.
-
- History: V 1.00 Initial release.
- With SVII-ProcessPics V 2.11 05.09.98 UpLoad to Aminet.
-
- V 1.01 add: Take requesters ect. from SVII-ProcessPics to make
- things easyer to test.
- add: Now it's possible to choose the SV-screendriver
- and the screenmode.
- add: Chancel-requester.
- add: Text-output to CON:
-
- V 1.02 add: Now it's possible to choose the SV-screendriver, that you set with SV-Prefs.
-
- V 1.03 add: Save prefs to 'ENVARC:SV-Slideshow.prefs'
- (last used pic-path, screenmode and SV-Driver).
- changed: Now you get always the last used pic-path in the file-requester,
- if you choose in the SV-ScreenDriver-request 'Last used', the last
- used screenmode and SV-Driver will be used again.
- add: Improved text-output to CON: (pic-path+name, pic-size).
-
- V 1.04 add: Default-settings if no prefsfile ( path = SYS: , SV-Driver = AGA/RTG WindowDriver )
-
- V 1.05 Correct problems with spaces in device- or pathname (problem with ReqTools-fr).
- add: If the last used pic-path did'nt exists anymore (like changed CD-ROM), the default-path
- will be used.
- With SVII-ProcessPics V 2.20 03.10.98 UpLoad to Aminet.
-
- V 1.06 changed: Take changes, that I have made and testet in SVII-ProcessPics.rexx V 2.20.
- Better ERROR handling.
- All requesters have now keyboard-shortcuts.
- Shorten the interpretation of the LIBRARY.controlpad.
-
- ===============================================================================================================================*/
-
- OPTIONS RESULTS
- OPTIONS FAILAT 21
- SIGNAL ON ERROR
- SIGNAL ON break_c
- SIGNAL ON break_d
- SIGNAL ON failure
- SIGNAL ON halt
- SIGNAL ON ioerr
- SIGNAL ON syntax
-
- SV = 'SYS:SViewII/SViewII' /* the path to SViewII, change it to your needs! */
-
- SVIIPORT = 'SViewII.rx' /* default ARexx-Port of SViewII */
-
- showtime = 5 /* how long should every pic shown ? */
-
- txt_svdr0 = '_Window' /* works on AGA- and RTG-Screens */
- txt_svdr1 = '_CGX|' /* I think most people use CGX */
- txt_svdr2 = 'use SV-_Prefs|' /* Screendriver that you set in SV-Prefs */
- txt_svdr3 = '_Last used|' /* Last used Screendriver saved in ENVARC:SV-Slideshow.prefs */
-
- /*============================================ please don't change anything below this line ===================================*/
-
- SVII = 'Run >NIL: 'SV' -INSTALL_APPMENU=FALSE -INSTALL_APPICON=FALSE'
-
- NL = '0a'x
- BL = ''
- NR = ''
- WS = ''
- HG3 = ''
- win = 0
-
- say BL||in_txt1||NL||in_txt2||NR
-
- IF ~SHOW('L',"rexxreqtools.library") THEN CALL ADDLIB("rexxreqtools.library",0,-30)
- IF ~SHOW('L',"rexxreqtools.library") THEN DO
- SAY "Could not open the RexxReqTools.library !"
- Call Error
- END
-
- IF ~SHOW('P',SVIIPORT) THEN DO
- address command
- SVII
- 'WaitForPort' SVIIPORT
- END
-
- ADDRESS VALUE SVIIPORT
-
- call text
-
- IF OPEN('Prefs','ENV:SV-Slideshow.prefs','r') THEN DO /* read Prefsfile */
- Dir = READLN('Prefs')
- SVDR = READLN('Prefs')
- ScreenMode1 = READLN('Prefs')
- CLOSE('Prefs')
- END
- ELSE do /* no Prefsfile */
- Dir = 'SYS:'
- SVDR = 'AGA/RTG WindowDriver'
- win = 1
- END
-
- IF EXISTS(Dir) = 0 THEN DO
- call rtfreefilebuffer()
- Dir = 'SYS:'
- END
-
- call rtfilerequest(Dir,,'Pick files to show',,, /* ReqTools-Filerequester - get a list of all files to show */
- 'rtfi_flags=freqf_multiselect',
- 'rtfi_buffer=true',
- 'rt_reqpos=reqpos_centerscr',files)
-
- if files == 0 then do /* you chancel */
- call rtezrequest('You did not select'||NL||,
- 'a picture to show.'||NL||,
- 'I stop working !',,
- '_OK',,
- 'Chancel-Requester',,
- 'rtez_flags = ezreqf_centertext',
- 'rt_reqpos=reqpos_centerscr')
- call Ausgang
- END
-
- if files == 1 then DO
-
- parse var files.1 LW ':' DN
- Pfad = ''
- do forever
- parse var DN Pfad1 '/' DN
- if DN = ''
- then break
- Pfad = Pfad||Pfad1'/'
- end
- Dir = LW||':'||Pfad
-
- SD = rtezrequest('Which SV-ScreenDriver do you like to use ?',, /* witch SVDriver */
- txt_svdr1||txt_svdr2||txt_svdr3||txt_svdr0,,
- in_txt1,,
- 'rtez_flags = ezreqf_centertext',
- 'rtez_defaultresponse = 0',
- 'rt_reqpos=reqpos_centerscr')
-
- if SD = 0 then do
- 'SVDRIVER=AGA/RTG WindowDriver'
- win = 1
- SVDR = 'AGA/RTG WindowDriver'
- ScreenMode = ScreenMode1
- END
-
- if SD > 0 then win = 0
-
- if SD = 1 then do
- 'SVDRIVER=CyberGraphX ScreenDriver'
- SVDR = 'CyberGraphX ScreenDriver'
- END
-
- if SD = 2 then do
- IF OPEN('PrefsDriver','env:superview-library/LIBRARY.controlpad','R') THEN DO
- PrefsDriver_txt = READLN('PrefsDriver')
- CLOSE('PrefsDriver')
- parse var PrefsDriver_txt def '=' SVPD
- if SVPD = 'AGA.svdriver' then SVDR = 'AGA ScreenDriver'
- if SVPD = 'CyberGraphics.svdriver' then SVDR = 'CyberGraphX ScreenDriver'
- if SVPD = 'ECS.svdriver' then SVDR = 'ECS ScreenDriver'
- if SVPD = 'EGS7.svdriver' then SVDR = 'EGS7 ScreenDriver'
- if SVPD = 'MERLIN.svdriver' then SVDR = 'MERLIN ScreenDriver'
- if SVPD = 'OPAL.svdriver' then SVDR = 'OPAL ScreenDriver'
- if SVPD = 'Picasso96.svdriver' then SVDR = 'Picasso96 ScreenDriver'
- if SVPD = 'PicassoII.svdriver' then SVDR = 'PicassoII ScreenDriver'
- if SVPD = 'Retina.svdriver' then SVDR = 'Retina Driver'
- if SVPD = 'Window.svdriver' then do
- SVDR = 'AGA/RTG WindowDriver'
- win = 1
- END
- 'SVDRIVER='||SVDR
- END
- END
-
- if SD = 3 then do
- 'SVDRIVER='||SVDR
- 'VIEWMODE='ScreenMode1
- ScreenMode = ScreenMode1
- win = 1
- END
-
- IF win = 0 THEN DO /* select screenmode if'nt window-driver or last used */
- call rtscreenmoderequest('Please select the ScreenMode for your SV-ScreenDriver',,,
- 'rtsc_flags = screqf_sizegads|screqf_depthgad',
- 'rt_reqpos=reqpos_centerscr',screen)
- ScreenMode = screen.name
- 'VIEWMODE='ScreenMode
-
- if screen = '0' then do /* you chancel screenmode requester */
- call rtezrequest('You did not select a ScreenMode'||NL||,
- 'I try the last used ScreenMode !',,
- '_OK',,
- 'No ScreenMode',,
- 'rtez_flags = ezreqf_centertext',
- 'rt_reqpos=reqpos_centerscr')
- 'VIEWMODE='ScreenMode1
- ScreenMode = ScreenMode1
- END
- END
-
- IF OPEN('Prefs','ENVARC:SV-Slideshow.prefs','w') THEN DO
- WRITELN('Prefs',Dir)
- WRITELN('Prefs',SVDR)
- WRITELN('Prefs',ScreenMode)
- CLOSE('Prefs')
- address command copy 'ENVARC:SV-Slideshow.prefs TO ENV:'
- END
- END
-
- if files == 1 then
-
- do i=1 to files.count /* repeat loop until all files have been shown */
-
- 'SHOW='||files.i /* load the picture */
-
- 'STATUS=T:SVStatus'
- IF OPEN('Stat','T:SVStatus','R') THEN DO
- Stat_txt = READLN('Stat')
- CLOSE('Stat')
- say i||". "||files.i||" "||Stat_txt
- END
-
- address command Wait showtime /* how long show each picture */
- END
-
- 'UNSHOW'
-
- say (i-1)' pictures were shown successfully.' /* tell the user it's done o.k. */
- say BL||WS||HG3||tx||NR
- address command Wait showtime
-
- call Ausgang
-
- ERROR: /* ERROR Procedure */
- failure:
- ioerr:
- syntax:
-
- call rtezrequest('+++ ERROR +++'||NL||,
- 'No.: '||RC||' '||ErrorText(RC)||NL||,
- 'in Line' sigl '--> 'SOURCELINE(sigl)' <--',,
- 'Please send an e-mail to : _UFalke@t-online.de',,
- 'ERROR-Requester',,
- 'rtez_flags = ezreqf_centertext',
- 'rt_reqpos = reqpos_centerscr')
- call Ausgang
-
- break_c:
- break_d:
- halt:
-
- call rtezrequest('You type CTRL-c !'||NL||,
- 'I''m stop working !',,
- '_OK',,
- 'Chancel-Requester',,
- 'rtez_flags = ezreqf_centertext',
- 'rt_reqpos = reqpos_centerscr')
- call Ausgang
-
- Ausgang:
-
- 'UNSHOW'
- IF EXISTS('t:SVStatus') THEN address command 'c:delete t:SVStatus QUIET'
- EXIT
-
- END
- text:
- /*
-
- /\ Ulrich Falke
- __ \/ _ Jakobistr. 2
- __/// /||\/||¯/_ /| D-59494 Soest
- \XX/ /¯|| || \//¯| */
-
- tx='AMIGA definately BACK FOR THE FUTURE --- UFalke@t-online.de' /*
-
- A3000/060-50MHz+PPC403e-200MHz/70MB RAM/~7GB HD's/Toshiba XM3701S/CVisionPPC-CGX V3/Mitsubishi 16Zoll Monitor
- */
-
-